<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/themes/icon.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/ainit.css" type="text/css"></link>
 	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js"></script>
 	<script type="text/javascript" src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.1.3.1.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.json-2.4.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.ainit-1.0.0.js"></script>
   <script type="text/javascript" src="${pageContext.request.contextPath}/js/ainit-index.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/model/js/jquery.ainit-1.1.0.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/model/js/model.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/model/js/tkModelStyle.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/model/js/butnScript.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/model/single/testTree.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/datagrid-groupview.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/model/dataList/element.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/model/dataList/joinElement.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/model/perJs/hztx.js"></script> 
	
	<script type="text/javascript">
		//butnList   colId  type  jsUrl   panelTitle  prefix 
		$(function(){
			var gName = eval("window.parent.${m.dsId}_gn"); // 主键
			initTQuery("DATALIST;QUERYCLN;commUse",'${m.prefix}',gName);
		});
	</script>
</head>
<body  onresize="resizeGrid();" >
	<div id="${m.prefix}_S_QUERY">
		<div id='${m.prefix}_parentTabPanel' >
			<div>
				<table cellpadding="0" cellspacing="0" style="width: 100%;height:100%;padding-top: 10px;min-width: 1248px;">
					<tr>
						<td>
							<div id="${m.prefix}_useCon" pre='${m.prefix}'  >  
								<table class='tableBord' id="${m.prefix}_commUse"  style="float: left"></table>
								<span style="line-height: 35px;margin-left: 10px">
									<input type="checkbox"  id='queryCB' onclick="showQuery(this,'${m.prefix}_QueryList','${m.prefix}_config',1)"/>
									<span style="cursor: pointer;" onclick="showQuerySpan(this,'${m.prefix}_QueryList','${m.prefix}_config',1)">多条件查询</span>
								</span>
					        </div>  
						</td>
						<td align="right" style="vertical-align: top; ">
									<div  id="${m.prefix}_queryButn" >
								<!-- 公用的按钮-->
								<c:forEach items="${m.butnList}" var="butp">
									<!-- 分组的公用按钮 -->
									<c:if test="${not empty butp.IS_GROUP && butp.IS_GROUP =='T'}">  
										<a href="javascript:void(0)" id="mb2" plain="false" isbutn="true"  code='${m.prefix}_${butp.BUT_CODE}' menu="#${butp.GROUP_ID}" class="easyui-menubutton" iconCls="${butp.iconCls}">${butp.BUTN_NAME}</a>
										<div id="id=${butp.GROUP_ID}" >
											<c:forEach items="${m.butnList}" var="butnp">
												<c:if test="${butnp.IS_GROUP != 'T' && not empty butnp.GROUP_ID  && butnp.GROUP_ID==butp.GROUP_ID}">
													<c:if test="${empty butnp.SCRIPT_FUNC}">
											   			<div  iconCls="${butnp.iconCls}" isbutn="true" code='${m.prefix}_${butnp.BUT_CODE}'   pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='1'  oflag="1" sflag="s" >${butnp.BUTN_NAME}</div> 
											   		</c:if>
											   		<c:if test="${not empty butnp.SCRIPT_FUNC}">
												   		<div onclick="${butnp.SCRIPT_FUNC}"  isbutn="true" iconCls="${butnp.iconCls}" code='${m.prefix}_${butnp.BUT_CODE}'   pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='1'  oflag="1" sflag="s"  >${butnp.BUTN_NAME}</div>  
											   		</c:if>
												</c:if>
											</c:forEach>
										</div>
									</c:if>
									<!-- 非分组公用按钮 -->
									<c:if test="${empty butp.IS_GROUP && empty butp.GROUP_ID}">
										<c:if test="${empty butp.SCRIPT_FUNC}">
											<a class='easyui-linkbutton'  iconCls="${butp.ICONCLS}" isbutn="true"  id="${m.prefix}_${butp.BUT_CODE}"   oflag="1" sflag="s"  code='${m.prefix}_${butp.BUT_CODE}'  pre='${m.prefix}' dsid='${m.dsId}' flag='1'  >${butp.BUTN_NAME}</a>
										</c:if>
										<c:if test="${not empty butp.SCRIPT_FUNC}">
											<a class='easyui-linkbutton' iconCls="${butp.ICONCLS}" isbutn="true" id="${m.prefix}_${butp.BUT_CODE}" onclick="${butp.SCRIPT_FUNC}"  oflag="1" sflag="s"  code='${m.prefix}_${butp.BUT_CODE}'  pre='${m.prefix}' dsid='${m.dsId}' flag='1' >${butp.BUTN_NAME}</a>
										</c:if>
									</c:if>
								</c:forEach>
								
								<!-- 个性的按钮 -->
								<c:forEach items="${m.preButnList}" var="but">
									<!-- 分组的个性化的按钮 -->
									<c:if test="${not empty but.IS_GROUP && but.IS_GROUP =='T' && not empty but.GROUP_ID}">
										<a href="javascript:void(0)" id="mb2" plain="false"  isbutn="true"  code='${m.prefix}_${but.BUT_CODE}'  menu="#${but.GROUP_ID}" class="easyui-menubutton" iconCls="${but.iconCls}" >${but.BUTN_NAME}</a>
											<div id="${but.GROUP_ID}" style="width: 150px;">
												<c:forEach items="${m.preButnList}" var="butn">
													<c:if test="${butn.IS_GROUP != 'T' && not empty butn.GROUP_ID && butn.GROUP_ID==but.GROUP_ID}">
														<c:if test="${empty butn.SCRIPT_FUNC}">
												   			<div   iconCls="${butn.iconCls}"  isbutn="true" code='${m.prefix}_${butn.BUT_CODE}' pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='1'  oflag="1" sflag="s" >${butn.BUTN_NAME}</div> 
												   		</c:if>
												   		<c:if test="${not empty butn.SCRIPT_FUNC}">
													   		<div   onclick="${butn.SCRIPT_FUNC}" isbutn="true" iconCls="${butn.iconCls}" code='${m.prefix}_${butn.BUT_CODE}'  pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='1'  oflag="1" sflag="s" >${butn.BUTN_NAME}</div>  
												   		</c:if>
													</c:if>
												</c:forEach>
											</div>
									</c:if>
									<!-- 非分组的个性化的按钮-->
									<c:if test="${empty but.GROUP_ID && empty but.IS_GROUP}">  
										<c:if test="${empty but.SCRIPT_FUNC}">
											<a class='easyui-linkbutton'  isbutn="true" iconCls="${but.iconCls}" code="${m.prefix}_${but.BUT_CODE}" id='${m.prefix}_${but.BUT_CODE}'  oflag="1" sflag="s"   pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='1' >${but.BUTN_NAME}</a>
										</c:if>
										<c:if test="${not empty but.SCRIPT_FUNC}">
											<a class='easyui-linkbutton' isbutn="true" onclick="${but.SCRIPT_FUNC}"  iconCls="${but.iconCls}" code="${m.prefix}_${but.BUT_CODE}" id='${m.prefix}_${but.BUT_CODE}'  oflag="1" sflag="s"  pre='${m.prefix}' dsid='${m.dsId}' tit='${m.panelTitle}' flag='1' >${but.BUTN_NAME}</a>
										</c:if>
									</c:if>
								</c:forEach>
							</div> 
						</td>
					</tr>
			    </table>
			</div>
			<div id="${m.prefix}_costTabPanel"  style="width: 100%;height:500px; padding-top: 10px;">  
		        <div  id="${m.prefix}_QueryList"  prefix="${m.prefix}" dsid='${m.dsId}'  >  <!--需要修改的地方-->
					<table cellpadding="0" cellspacing="0" style="width: 100%;height:100%;padding-top: 10px; ">
						<tr>
							<td colspan="2" style="padding-top: 10px;">
								<!-- 数据列表 -->	
								<table id="${m.prefix}_DATALIST" ></table>
							</td>
						</tr>
						<tr>
							<td>
								<div id='${m.prefix}_congfigVal'  style="border:1px solid #99BBE8;font-size:14px; color: green;height: 30px;margin-top:5px;"></div>
							</td>
						</tr>
					</table>
		        </div>  
		        <div id="${m.prefix}_config" style="display: none;" pre='${m.prefix}'>  
					<table cellpadding="0" cellspacing="0" style="width: 100%;padding:20px;">
						<tr>
							<td style="padding-top: 10px;">
								<!-- 查询条件 	-->
								<table class='tableBord' id="${m.prefix}_QUERYCLN"></table>
							</td>
						</tr>
					</table>
		        </div>  
		    </div>
		</div>
		<input type="hidden" id='${m.prefix}_sq_pks'/>
		<input type="hidden" id="${m.prefix}_dsId" value="${m.dsId}"/>
		<input type="hidden" id="${m.prefix}_type" value="${m.type}"/>
		<input type="hidden" id="${m.prefix}_jsUrl" value="${m.jsUrl}"/>
		<input type="hidden" id="${m.prefix}_prefix" value="${m.prefix}"/>
		<input type="hidden" id="${m.prefix}_initFunc" value="${m.initFunc}"/>
		<input type="hidden" id="${m.prefix}_ainitFunc" value="${m.ainitFunc}"/>
		<input type="hidden" id="${m.prefix}_keyValue" value="${m.keyValues}"/>
		<input type="hidden" id="${m.prefix}_choice" value="${m.choice}"/>
		<input type="hidden" id="${m.prefix}_aoru" value="${m.aoru}"/>
		<input type="hidden" id="${m.prefix}_pks" value="${m.pks}"/>
		<input type="hidden" id="${m.prefix}_winitFunc" value="${m.winitFunc}"/>
		<input type="hidden" id="${m.prefix}_wainitFunc" value="${m.wainitFunc}"/>
		<input type="hidden" id="${m.prefix}_totalFlag" value="${m.totalFlag}"/>
	</div>
</body>
</html>